/******************************************************************************
 * @File         : rtc.h
 *
 * @Version      : V2.0
 * @Revision     : none
 * @Created date : 2017/1/18 18:32:33
 * @Last modified: 2017/01/18 18:33:02
 * @Modified by  : Chen Bo
 *
 * @Brief        : rtc driver header file
 *
 * Copyright (C) 2017~2016 Skyrelay Technology Corp. All rights reserved.
 *****************************************************************************/

#ifndef __RC2412_RTC_DEF_H__
#define __RC2412_RTC_DEF_H__

#ifdef __cplusplus
extern "C"
{
#endif

//Error code
#define RTC_INVALID_PARA       0x0C01

#define ONCE_MODE              0
#define REPEAT_MODE            1
#define SOURCE_RC32K           0
#define SOURCE_OSC32K          1
#define RTC_SELECT_RC32K       (AON_CSM->OSC = 0)
#define RTC_SELECT_OSC32K      (AON_CSM->OSC = 1)
#define RTC_CLEAR_COUNTER      (RTC->STR = RTC_CLR_Msk)


#ifdef __cplusplus
}
#endif

#endif //__RTC_H__

/*** (C) COPYRIGHT 2018 Skyrelay Technology Corp. ***/
